<template>
  <view class="approval-item">
    <CommonHeader>调岗申请</CommonHeader>
    <view class="approval-content">
      <CommonInfo approvalType="调岗" />
      <view class="input-area">
        <BeforeDateSelect label="生效日期" @getSelectDate="getEffectiveDate" />
        <BeforeDateSelect label="入职日期" @getSelectDate="getHireDate" />
        <Field label="原部门" @getValue="getOldDepartment" />
        <Field label="原职位" @getValue="getOldJob" />
        <Field label="新部门" @getValue="getNewDepartment" />
        <Field label="新职位" @getValue="getNewJob" />
      </view>
      <ApprovalButton
        :warn="warn"
        :approvalType="'adjustJob'"
        :procInfo="{
          effectiveDate: String(approval.effectiveDate),
          hireDate: String(approval.hireDate),
          oldDepartment: approval.oldDepartment,
          oldJob: approval.oldJob,
          newDepartment: approval.newDepartment,
          newJob: approval.newJob,
        }"
      />
    </view>
    <van-toast id="van-toast" />
  </view>
</template>
<script src="./script.js"></script>
<style lang="less" src="./style.less"></style>
